package com.rp.configure.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.rp.configure.entity.Device;
import com.rp.configure.entity.DeviceAttribute;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author vicente
 * @since 2021-07-16
 */
@Mapper
@Component
public interface DeviceMapper extends BaseMapper<Device> {

    IPage<Device> listPage(Page page,@Param("gatewayId") String gatewayId);

    List<Device> listByGateway(@Param(Constants.WRAPPER)QueryWrapper<DeviceAttribute> queryWrapper);
}
